package com.demo.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.demo.entity.User;
import com.demo.response.UserAndUserAuth;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Description:
 * @author: fanfan
 * @date: 2018/5/11 16:41
 */
public interface UserDao extends BaseMapper<User>{
    @Select("select u.user_id,u.username,ua.slp_score from `user` as u left join `user_auth_info` ua " +
            "on u.user_id=ua.user_id where u.user_id in (${userIds})")
    public List<UserAndUserAuth> getUserAndUserAuth(@Param("userIds") String userIds);
}
